<script>
/*
 * @Author: Your name
 * @Date:   2020-07-21 18:14:02
 * @Last Modified by:   Your name
 * @Last Modified time: 2020-07-21 23:47:23
 */
</script>
<template>
  <div id="commentContainer">
    <div class="header">
      <div class="header-left">买家评价  5</div>
      <div class="header-right">更多  ></div>
    </div>
    <div class="comment-item" v-for="(item, index) in  detailComment" :key="index">
      
      <div class="user-message">
        <img :src="item.userImage" alt="">
        <div class="username">{{item.userName}}</div>
      </div>
      <div class="user-content">
        {{item.content}}
      </div>
      <div class="footer">
        <span>{{item.params}}</span><span>{{item.date}}</span>
      </div>
    </div>
  </div>
</template>
<script>
import {formatDate} from '../../../common/utils.js'
export default {
  name: 'DetailComment',
  props: {
    detailComment: {
      type: Array,
      default(){
        return []
      }
    }
  },
  filters: {
    dateFormat(value){
      let date = value;
      return formatDate(date, 'yyyy-MM-dd');
    }
  }
}
</script>
<style lang="css">
  #commentContainer{
    width: 100%;
    background: #ffffff;
  }
  #commentContainer .header{
    display: flex;
    justify-content: space-between;
    color: var(--color-high-text);
    padding: 0 10px;
  }
  .comment-item{
    padding: 10px 10px 18px 10px;
    border-bottom: 2px solid rgba(100, 100, 100, .1);
  }
  .user-message{
    display: flex;
    align-items: center;
    height: 50px;
    line-height: 50px;
  }
  .user-message img{
    width: 26px;
    height: 26px;
    border-radius: 50%;
  }
  .user-message .username{
    font-size: 13px;
    margin-left: 10px;
  }
  .user-content{
    padding: 5px 10px 10px 10px;
    font-size: 13px;
    text-indent: 2em;
  }
  .footer{
    padding-left: 10px;
    font-size: 12px;
  }
  .footer span{
    margin-right: 8px;
  }
</style>